home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / bug_03.tg < prev    next >
Encoding:
Text File  |  2001-10-20  |  845 b   |  27 lines

  1. ##########################################################################
  2. ## Move files
  3. # I got a bug report that when in -detach mode, 'move' would only move 
  4. #    the first file. 
  5. ## Well, looks like the CMD.EXE internal commands that take wildcards 
  6. ## don't work in detached mode.
  7. ## To get things to work, you need and external command.
  8. {
  9.     -start    
  10.     -stop
  11.     # fails -- only moves one file
  12.     #-command -detach cmd /c move c:\temp\from\*.* c:\temp\to
  13.  
  14.     # fails -- only copies one file
  15.     #-command -detach cmd /c copy c:\temp\from\*.* c:\temp\to
  16.  
  17.     # works fine
  18.     #-command cmd /c copy c:\temp\from\*.* c:\temp\to
  19.  
  20.     # fails -- only copies one file
  21.     #-command -detach cmd /c c:\temp\mymove c:\temp\from\*.* c:\temp\to
  22.  
  23.     # Works! (using an external command 'MoveFile')
  24.     -command -detach MoveFile c:\temp\from\*.* c:\temp\to
  25. }
  26.  
  27.